package com.shop.user.feign.resource;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年05月09日  9:49
 */
@FeignClient(serviceId = "resource")
public interface IResourceFeignClientSvc {

    @PostMapping(value = "res/emailCode", consumes = "application/json")
    Map<String,Object> sendEmailCode(@RequestParam("code") String code, @RequestParam("email") String email);

    @PostMapping(value = "res/uploadImg", consumes = "application/json")
    Map<String,Object> uploadImgToQi(@RequestBody MultipartFile file);

    @PostMapping(value = "res/smsCode", consumes = "application/json")
    Map<String,Object> sendSmsCode(@RequestParam("code") String code, @RequestParam("mobile") String mobile);

    @GetMapping(value = "res/smsMsg", consumes = "application/json")
    Map<String,Object> sendSmsMsg(@RequestParam("content") String content, @RequestParam("mobile") String mobile);
}
